package com.hos.net.req.doc;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.hos.net.req.BaseReq;
import com.hos.net.res.MsgHint;

/**
 * 登录
 * Created by Administrator on 2018/8/24 0024.
 */
@JsonIgnoreProperties(ignoreUnknown = true)
public class DocRestPwdReq extends BaseReq {
    //登录账号
    public String phone;
    //登录密码
    public String pwd;
    @JsonIgnore
    public String hint;

    // (false 检验失败)
    @JsonIgnore
    public boolean isVerifyParameter() {
        if (phone == null || phone == "") {
            hint = new MsgHint("手机号不能为空").toJson();
            return false;
        }
        if (pwd == null || pwd == "") {
            hint = new MsgHint("登录密码不能为空").toJson();
            return false;
        }
        return true;
    }
}
